<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let obj = {
            name:'pink老师',
            age:'18',
            gender:'男',
            say:function(){
                console.log(sayHello);
            }
        }
        for(let k in obj){
            console.log(k); //得到的是属性名
            console.log(obj[k]); //得到的是属性值
        }
    </script>
</body>
</html>